Select(TSource, TResult) Method (ParallelQuery(TSource), Func(TSource, Int32, TResult))

Task Parallel System.Threading

Projects in parallel each element of a sequence into a new form by incorporating the element's index.

Namespace:  System.Linq
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function Select(Of TSource, TResult) ( _
	source As ParallelQuery(Of TSource), _
	selector As Func(Of TSource, Integer, TResult) _
) As ParallelQuery(Of TResult)
C#
public static ParallelQuery<TResult> Select<TSource, TResult>(
	ParallelQuery<TSource> source,
	Func<TSource, int, TResult> selector
)

Parameters

source
Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
A sequence of values to invoke a transform function on.
selector
Type: System..::.Func<(Of <(TSource, Int32, TResult>)>)
A transform function to apply to each element.

Type Parameters

TSource
The type of the elements of source.
TResult
The type of elements resturned by selector.

Return Value

A sequence whose elements are the result of invoking the transform function on each element of source.

Exceptions

ExceptionCondition
System..::.ArgumentNullException source or selector is a null reference (Nothing in Visual Basic).

See Also